package com.dfbz.demo03_枚举的抽象方法;

import org.junit.Test;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo01 {
    @Test
    public void test1()throws Exception{

        AbstractSeason winterSeason = new AbstractSeason() {
            @Override
            public void fun() {
                System.out.println("冬天！");
            }
        };

        winterSeason.fun();

        AbstractSeason summerSeason = new AbstractSeason() {
            @Override
            public void fun() {
                System.out.println("夏天！");
            }
        };

        summerSeason.fun();
    }



    @Test
    public void test2()throws Exception{

        Season spring = Season.SPRING;
        spring.fun();

        System.out.println("---------------");

        Season winter = Season.WINTER;
        winter.fun();
        winter.show();

    }



}
